package com.lwc.mapper;

import com.lwc.bean.DeliveryEntryDetails;
import com.lwc.bean.Outbound;
import com.lwc.bean.OutboundQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface OutboundMapper {
    List<Outbound> query(OutboundQuery outboundQuery);


    List<DeliveryEntryDetails> getqueryById(int id);

    /**
     * 通过出货单id  更改状态
     * @param id
     * @return
     */
    @Update("update  godown_entry set   godown_status=1 where  id=#{id}")
    int getupdatetrue(int id);
    @Update("update  material_stock set  stock=stock-#{stock}  where id=#{id}")
    int deduct(@Param("id") int id,@Param("stock") int stock);

}
